@extends('admin.layouts.app')
@include('vendor.ueditor.assets')
@section('content')

                        <!-- Page-Title -->
                        <div class="row">
                            <div class="col-sm-12">
                                <h4 class="page-title">产品管理</h4>
                                <ol class="breadcrumb">
                                    <li><a href="{{url('zadmin/')}}">系统</a></li>
                                    
                                    <li class="active">修改产品</li>
                                </ol>
                            </div>
                        </div>
                        
                        <div class="row">
                        	<div class="col-lg-12">
                        		<div class="card-box">
                            <h2 class="m-t-0 header-title">添加产品</h2>
                            <hr/>
                             @if(session('rs'))
                              <div class="alert alert-{{session('rs')['status']}}">
                                {{ session('rs')['msg'] }}
                              </div>
                              @endif
                        			<div class="row">
			                        	<div class="col-md-9">
                                  <form class="form-horizontal" role="form" action="{{url('zadmin/product')}}" enctype="multipart/form-data" method="post" >

                                              <div class="form-group">
                                                  <label class="col-md-2 control-label">商品名</label>
                                                  <div class="col-md-10">
                                                      <input type="input" class="form-control" name="name" required="" value="">
                                                  </div>
                                                 
                                              </div>
                                              <div class="form-group">
                                                  <label class="col-md-2 control-label">分类</label>
                                                  <div class="col-md-10">
                                                      <select  class="form-control" name="type" required="">
                                                        <option value="">请选择</option>
                                                        <option value="1">销售</option>
                                                        <option value="2">租赁</option>
                                                      </select>
                                                  </div>
                                                 
                                              </div>
                                               <div class="form-group">
                                                  <label class="col-md-2 control-label">图片</label>
                                                  <div class="col-md-10">
                                                      <input type="file" class="form-control" name="pic" required="" >
                                                  </div>
                                                 
                                              </div>
                                              <div class="form-group">
                                                  <label class="col-md-2 control-label">尺寸</label>
                                                  <div class="col-md-10">
                                                      <input type="input" class="form-control" name="size" required=""  value="">
                                                  </div>
                                                 
                                              </div>
                                              <div class="form-group">
                                                  <label class="col-md-2 control-label">容积</label>
                                                  <div class="col-md-10">
                                                      <input type="input" class="form-control" name="volume"  value="">
                                                  </div>
                                                 
                                              </div>
                                              <div class="form-group">
                                                  <label class="col-md-2 control-label">载重</label>
                                                  <div class="col-md-10">
                                                      <input type="input" class="form-control" name="weight"  value="">
                                                  </div>
                                                 
                                              </div>
                                              <div class="form-group">
                                                  <label class="col-md-2 control-label">工况续航</label>
                                                  <div class="col-md-10">
                                                      <input type="input" class="form-control" name="xuhang"  value="">
                                                  </div>
                                                 
                                              </div>
                                              <div class="form-group">
                                                  <label class="col-md-2 control-label">电池</label>
                                                  <div class="col-md-10">
                                                      <input type="input" class="form-control" name="battery"  value="">
                                                  </div>
                                                 
                                              </div>
                                              <div class="form-group">
                                                  <label class="col-md-2 control-label">价格</label>
                                                  <div class="col-md-10">
                                                      <input type="input" class="form-control" name="price" required="" value="">
                                                  </div>
                                                 
                                              </div>
                                              <div class="form-group">
                                                  <label class="col-md-2 control-label">是否推荐</label>
                                                  <div class="col-md-10">
                                                    <input type="radio" name="is_rec" required="" value="1" checked="">是
                                                    <input type="radio"  name="is_rec" required="" value="0">否
                                                  </div>
                                                 
                                              </div>
                                                                                                                 
                    <div class="form-group">
                      <label class="col-md-2 control-label">内容</label>
                      <div class="col-md-10" >
                      <!-- 实例化编辑器 -->
<script type="text/javascript">
    var ue = UE.getEditor('container');
    ue.ready(function() {
        ue.execCommand('serverparam', '_token', '{{ csrf_token() }}'); // 设置 CSRF token.
    });
</script>

<!-- 编辑器容器 -->
<script id="container" name="contents" type="text/plain"></script>
                                                  </div>
                                              </div>

                                              <div class="form-group text-center">
                                                  
                                                  <button type="submit" class="btn btn-info waves-effect waves-light">保存</button>
                                              </div>
                                              
                                              
                             {{csrf_field()}}
                                          </form>
                                </div>
			                        	
			                        </div>

                             
			                        
                        			
                        		</div>
                                
                            </div> <!-- end col -->

                            
                        </div>
@endsection
                        
                        
                        

                  
            
    
       

           



    
       
    
